package com.wn.bean;

import lombok.Data;

/**
 * @author yellow Docter
 * @date 2022 -07-12
 * @desc
 */
@Data
public class R {

    private String msg;

    private Integer code;

    private Object data;

    public static R ERROR() {

        R r = new R();
        r.setMsg("失败");
        r.setCode(200000);
        return r;
    }

    public static R OK() {

        R r = new R();
        r.setMsg("成功");
        r.setCode(100000);
        return r;
    }

    public static R OK(Object object) {

        R r = new R();
        r.setMsg("成功");
        r.setCode(100000);
        r.setData(object);
        return r;
    }
}
